package com.cskaoyan.mapper;

import com.cskaoyan.bean.pojo.MallCollect;
import com.cskaoyan.bean.pojo.MallCollectExample;
import com.cskaoyan.bean.vo.CollectVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface MallCollectMapper {
    long countByExample(MallCollectExample example);

    int deleteByExample(MallCollectExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MallCollect record);

    int insertSelective(MallCollect record);

    List<MallCollect> selectByExample(MallCollectExample example);

    MallCollect selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MallCollect record, @Param("example") MallCollectExample example);

    int updateByExample(@Param("record") MallCollect record, @Param("example") MallCollectExample example);

    int updateByPrimaryKeySelective(MallCollect record);

    int updateByPrimaryKey(MallCollect record);

    List<CollectVo> queryColletById(Integer id);

    Integer queryColletByUidAndVid(@Param("uid") Integer uid, @Param("valueId") Integer valueId);

    void insertCollet(@Param("cid") Integer cid,
                      @Param("uid") Integer uid,
                      @Param("valueId") Integer valueId,
                      @Param("type") Integer type,
                      @Param("addTime") Date addTime,
                      @Param("updateTime") Date updateTime,
                      @Param("deleted") int deleted);

    int ifCollect(@Param("uid") int uid, @Param("id") Integer id);
}